﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Carozos.BE;

namespace Carozos.Web
{
    public partial class frmBuscaProveedor : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void gv_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridViewRow r = gv.SelectedRow;
            ProveedorBE proBE = new ProveedorBE(Int32.Parse(gv.SelectedValue.ToString()), r.Cells[1].Text,
                r.Cells[2].Text, r.Cells[3].Text, r.Cells[4].Text, r.Cells[5].Text, r.Cells[6].Text);
            Session["proveedor"] = proBE;
            if (Session["codFrmProveedor"] != null)
            {
                if ((int)Session["codFrmProveedor"] == 1)
                    Server.Transfer("~/frmProveedor.aspx");
                if ((int)Session["codFrmProveedor"] == 2)
                    Server.Transfer("~/frmPedido.aspx");
            }
        }
    }
}